class User{
  final int id;
  final String username;
  final String password;
  final String avatar;

  User(this.id, this.username, this.password, this.avatar);

  User.fromJson(Map<String, dynamic> json)
      : id = json['id'],
        username = json['username'],
        password = json['password'],
        avatar = json['avatar'];

  Map<String, dynamic> toJson() =>
      <String, dynamic>{
        'id': id,
        'username': username,
        'password': password,
        'avatar': avatar,
      };
}